<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>正则表达式</title>
</head>

<body>
	
</body>
<script>
	
	str='linux and and 2 and 3 and 20 and linox and linax lin x php and LINUX and Php and pap and pbp nd pcp and linxx is lamp';
	//匹配所有的p什么p,lin什么x
	arr=str.match(/(p[a-z]p)|(lin[a-z]x)/ig); //圆括号将内容分成2个单词
	alert(arr);
</script>
</html>